home *** CD-ROM | disk | FTP | other *** search
/ Total Network Tools 2002 / NextStepPublishing-TotalNetworkTools2002-Win95.iso / Archive / Offline Browsing / HTTrack.exe / data1.cab / Sources / src / htsnet.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-04-28  |  2.4 KB  |  84 lines

  1. /* ------------------------------------------------------------ */
  2. /*
  3. HTTrack Website Copier, Offline Browser for Windows and Unix
  4. Copyright (C) Xavier Roche and other contributors
  5.  
  6. This program is free software; you can redistribute it and/or
  7. modify it under the terms of the GNU General Public License
  8. as published by the Free Software Foundation; either version 2
  9. of the License, or any later version.
  10.  
  11. This program is distributed in the hope that it will be useful,
  12. but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14. GNU General Public License for more details.
  15.  
  16. You should have received a copy of the GNU General Public License
  17. along with this program; if not, write to the Free Software
  18. Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  19.  
  20.  
  21. Important notes:
  22.  
  23. - We hereby ask people using this source NOT to use it in purpose of grabbing
  24. emails addresses, or collecting any other private information on persons.
  25. This would disgrace our work, and spoil the many hours we spent on it.
  26.  
  27.  
  28. Please visit our Website: http://www.httrack.com
  29. */
  30.  
  31.  
  32. /* ------------------------------------------------------------ */
  33. /* File: Net definitions                                        */
  34. /*       Used in .c files that needs connect() functions and so */
  35. /* Note: includes htsbasenet.h                                  */
  36. /* Author: Xavier Roche                                         */
  37. /* ------------------------------------------------------------ */
  38.  
  39. #ifndef HTS_DEFNETH
  40. #define HTS_DEFNETH
  41.  
  42. /* basic net definitions */
  43. #include "htsbasenet.h"
  44.  
  45. #include <ctype.h>
  46. #if HTS_WIN
  47.  #include <winsock.h>
  48.  //typedef SOCKET T_SOC;
  49.  // pour read
  50.  #include <io.h>
  51.  // pour FindFirstFile
  52.  #include <winbase.h>
  53. #else
  54.  //typedef int T_SOC;
  55.  #define INVALID_SOCKET -1
  56.  #include <netdb.h>
  57.  #include <sys/types.h>
  58.  #include <sys/socket.h>
  59.  #include <netinet/in.h>
  60.  #include <sys/time.h>
  61.  #include <sys/ioctl.h>
  62.  /* gethostname & co */
  63.  #include <unistd.h>
  64.  /* inet_addr */
  65.  #include <arpa/inet.h>
  66.  // pas la peine normalement..
  67. #if HTS_PLATFORM!=3
  68.  #include <sys/filio.h>
  69. #else
  70. #ifndef HTS_DO_NOT_REDEFINE_in_addr_t
  71.  typedef unsigned long in_addr_t;
  72. #endif
  73. #endif
  74. #ifndef min
  75.  #define min(a,b) ((a)>(b)?(b):(a))
  76.  #define max(a,b) ((a)>(b)?(a):(b))
  77. #endif
  78. #define Sleep(a) { if (((a)*1000)%1000000) usleep(((a)*1000)%1000000); if (((a)*1000)/1000000) sleep(((a)*1000)/1000000); }
  79. #endif
  80.  
  81. #endif
  82.  
  83.  
  84.